<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<title>后台管理</title>

		<meta name="keywords" content="">
		<meta name="description" content="">

		<!--[if lt IE 9]>
	    <meta http-equiv="refresh" content="0;ie.html" />
	    <![endif]-->

		<link rel="shortcut icon" href="favicon.ico">
		<link href="__PUBLIC__/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/animate.min.css" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	</head>

	<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
	<!--<body onload="connect()" class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">-->

		<div id="wrapper">
			<!--左侧导航开始-->
			<nav class="navbar-default navbar-static-side" role="navigation">
				<div class="nav-close"><i class="fa fa-times-circle"></i>
				</div>
				<div class="sidebar-collapse">
					<ul class="nav" id="side-menu">
						<li class="nav-header">
							<div class="dropdown profile-element">
								<span><img alt="image" class="img-circle" width="30px" src="__PUBLIC__/Admin/img/profile_small.jpg" /></span>
								<a data-toggle="dropdown" class="dropdown-toggle" href="#">
									<span class="clear">
                               			<span class="block m-t-xs"><strong class="font-bold">{$Think.session.adminster.username}</strong></span>
									<span class="text-muted text-xs block"><if condition="$Think.session.adminster.login_type eq 0">管理员<else/>{$Think.session.adminster.nickname}</if><b class="caret"></b></span>
									</span>
								</a>
								<ul class="dropdown-menu animated fadeInRight m-t-xs">
									<li>
										<a class="J_menuItem" href="{:U('Admin/Index/pwd')}">修改密码</a>
									</li>
									<if condition="$Think.session.admin.login_type eq 0">
										<li>
											<a href="{:U('Admin/Index/del')}">清理缓存</a>
										</li>
									</if>
									<li class="divider"></li>
									<li>
										<a href="{:U('Admin/Login/logout')}">安全退出</a>
									</li>
								</ul>
							</div>
							<div class="logo-element">M</div>
						</li>
						<volist name="navlist" id="first">
							<if condition="$first.pid eq '0'">
								<if condition="$first.controller eq 'index' && $first.function eq 'index'">
									<li>
										<a href="{:U($first['controller'].'/'.$first['function'])}">
											<i class="fa fa-home"></i>
											<span class="nav-label">{$first.nav_name}</span>
										</a>
									</li>
									<elseif condition="$first.controller eq 'Admin'  " />
									<li>
										<a href="#">
											<i class="fa fa fa-cog"></i>
											<span class="nav-label">{$first.nav_name}</span>
											<span class="fa arrow"></span>
										</a>
										<ul class="nav nav-second-level">
											<volist name="navlist" id="second">
												<if condition="$second.pid eq $first['id']">
													<li>
														<a class="J_menuItem" href="{:U($second['controller'].'/'.$second['function'])}">{$second.nav_name}</a>
													</li>
												</if>
											</volist>
										</ul>
									</li>
									<elseif condition="$first.controller eq 'Member'  " />
									<li>
										<a href="#">
											<i class="fa fa fa-user"></i>
											<span class="nav-label">{$first.nav_name}</span>
											<span class="fa arrow"></span>
										</a>
										<ul class="nav nav-second-level">
											<volist name="navlist" id="second">
												<if condition="$second.pid eq $first['id']">
													<li>
														<a class="J_menuItem" href="{:U($second['controller'].'/'.$second['function'])}">{$second.nav_name}</a>
													</li>
												</if>
											</volist>
										</ul>
									</li>

									<elseif condition="$first.controller eq 'Money'  " />
									<li>
										<a href="#">
											<i class="fa fa fa-money"></i>
											<span class="nav-label">{$first.nav_name}</span>
											<span class="fa arrow"></span>
										</a>
										<ul class="nav nav-second-level">
											<volist name="navlist" id="second">
												<if condition="$second.pid eq $first['id']">
													<li>
														<a class="J_menuItem" href="{:U($second['controller'].'/'.$second['function'])}">{$second.nav_name}</a>
													</li>
												</if>
											</volist>
										</ul>
									</li>

									<else/>
									<if condition="$first.controller eq 'integral' && $first.function eq 'gonggao'">
										<li>
											<a class="J_menuItem" href="{:U($first['controller'].'/'.$first['function'])}">
												<i class="fa fa fa-bar-chart-o"></i>
												<span class="nav-label">{$first.nav_name}</span>
											</a>
										</li>
										<else/>
										<li>
											<a href="#">
												<i class="fa fa fa-bar-chart-o"></i>
												<span class="nav-label">{$first.nav_name}</span>
												<span class="fa arrow"></span>
											</a>
											<ul class="nav nav-second-level">
												<volist name="navlist" id="second">
													<if condition="$second.pid eq $first['id']">
														<li>
															<a class="J_menuItem" href="{:U($second['controller'].'/'.$second['function'])}">{$second.nav_name}</a>
														</li>
													</if>
												</volist>
											</ul>
										</li>
									</if>
								</if>
							</if>
						</volist>
						
					</ul>
				</div>
			</nav>
			<!--左侧导航结束-->

			<!--右侧部分开始-->
			<div id="page-wrapper" class="gray-bg dashbard-1">
				<div class="row border-bottom">
					<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
						<div class="navbar-header" style="width: 10%;">
							<a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
						</div>
					</nav>
				</div>

				<div class="row content-tabs">
					<button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
                </button>
					<nav class="page-tabs J_menuTabs">
						<div class="page-tabs-content">
							<a href="javascript:;" class="active J_menuTab" data-id="index_v1.html">首页</a>
						</div>
					</nav>
					<button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i></button>
					<div class="btn-group roll-nav roll-right">
						<button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span></button>
						<ul role="menu" class="dropdown-menu dropdown-menu-right">
							<li class="J_tabShowActive">
								<a>定位当前选项卡</a>
							</li>
							<li class="divider"></li>
							<li class="J_tabCloseAll">
								<a>关闭全部选项卡</a>
							</li>
							<li class="J_tabCloseOther">
								<a>关闭其他选项卡</a>
							</li>
						</ul>
					</div>
					<a href="{:U('Admin/Login/logout')}" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
				</div>
				<div class="row J_mainContent" id="content-main">
					<iframe id="iframe_default" src="{:U('Admin/Index/main')}" class="J_iframe" name="iframe0" width="100%" height="100%" frameborder="0" data-id="default" seamless></iframe>
				</div>
				<div class="footer">
					<div class="pull-right">&copy; 2015 - {$date_year}
						<a href="" target="_blank"> BaYue</a>
					</div>
				</div>
			</div>
			<!--右侧部分结束-->
			
		</div>

		<script src="__PUBLIC__/Admin/js/jquery.min.js?v=2.1.4"></script>
		<script src="__PUBLIC__/Admin/js/bootstrap.min.js?v=3.3.6"></script>
		<script src="__PUBLIC__/Admin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
		<script src="__PUBLIC__/Admin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<script src="__PUBLIC__/Admin/js/plugins/layer/layer.min.js"></script>
		<script src="__PUBLIC__/Admin/js/hplus.min.js?v=4.1.0"></script>
		<script type="text/javascript" src="__PUBLIC__/Admin/js/contabs.min.js"></script>
		<script src="__PUBLIC__/Admin/js/plugins/pace/pace.min.js"></script>
		
		<script type="text/javascript" src="__PUBLIC__/worker/js/swfobject.js"></script>
		<script type="text/javascript" src="__PUBLIC__/worker/js/web_socket.js"></script>
		<script type="text/javascript">
			
			// if(typeof console == "undefined") {
			// 	this.console = {
			// 		log: function(msg) {}
			// 	};
			// }
			// WEB_SOCKET_SWF_LOCATION = "__PUBLIC__/worker/swf/WebSocketMain.swf";
			// WEB_SOCKET_DEBUG = true;
			// var ws, name;
			// // 连接服务端
			// function connect(){
			// 	// 创建websocket
			// 	ws = new WebSocket("ws://" + document.domain + ":7272");
			// 	// 当socket连接打开时，发送登录信息
			// 	ws.onopen = function(){
			// 		// 登录
			// 		var name = "{$info.username}";
			// 		var login_data = '{"type":"login","client_name":"'+name+'","room_id":"admin"}';
			//         console.log("websocket握手成功，发送登录数据:"+login_data);
			//         ws.send(login_data);
			// 	};
			// 	// 当有消息时根据消息类型显示不同信息
			// 	ws.onmessage = onmessage;
			// 	ws.onclose = function(){
			// 		console.log("连接关闭，定时重连");
			// 		connect();
			// 	};
			// 	ws.onerror = function() {
			// 		console.log("出现错误");
			// 	};
			// }

			// // 服务端发来消息时
			// function onmessage(e) {
			// 	//console.log(e.data);
			// 	var data = eval("(" + e.data + ")");
			// 	switch(data['type']) {
			// 		// 服务端ping客户端
			// 		case 'ping':
			// 			ws.send('{"type":"pong"}');
			// 			break;
			// 		// 登录 更新用户列表
			// 		case 'login':
			// 			console.log(data['client_name'] + "登录成功");
			// 			break;
			// 		case 'init':
			// 			// 利用jquery发起ajax请求，将client_id发给后端进行uid绑定
   //          			$.post('{:U("Admin/Integral/bind")}',{client_id: data.client_id},function(data){}, 'json');
			// 			break;
			// 		// 调用GatewayClient发消息时直接alert出来
			// 		case 'integral':
			// 			playSound();
			// 			break;
			// 	}
			// }
			
			function playSound()
		    {
		      var borswer = window.navigator.userAgent.toLowerCase();
		      if ( borswer.indexOf( "ie" ) >= 0 )
		      {
		        //IE内核浏览器
		        var strEmbed = '<embed name="embedPlay" src="http://www.gongqinglin.com/accessory/ding.wav" autostart="true" hidden="true" loop="false"></embed>';
		        if ( $( "body" ).find( "embed" ).length <= 0 )
		          $( "body" ).append( strEmbed );
		        var embed = document.embedPlay;
		
		        //浏览器不支持 audion，则使用 embed 播放
		        embed.volume = 100;
		        //embed.play();这个不需要
		      } else
		      {
		        //非IE内核浏览器
		        var strAudio = "<audio id='audioPlay' src='http://www.gongqinglin.com/accessory/ding.wav' hidden='true'>";
		        if ( $( "body" ).find( "audio" ).length <= 0 )
		          $( "body" ).append( strAudio );
		        var audio = document.getElementById( "audioPlay" );
		
		        //浏览器支持 audion
		        audio.play();
		      }
		    }
		</script>
		
	</body>

</html>